<HTML>
<!--
     Copyright (c) David Doria 2012

     Distributed under the Boost Software License, Version 1.0.
     (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
  -->
<Head>
<Title>Boost Graph Library: Directed Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
        ALINK="#ff0000">
<IMG SRC="../../../boost.png"
     ALT="C++ Boost" width="277" height="86">

<BR Clear>

<H1><A NAME="sec:directed-graph-class"></A>
<pre>
directed_graph&lt;VertexProp, EdgeProp, GraphProp&gt;
</pre>
</H1>


<P>
The <tt>directed_graph</tt> class template is a simplified version
of the BGL adjacency list. This class is provided for ease of use, but
may not perform as well as custom-defined adjacency list classes. Instances
of this template model the BidirectionalGraph, VertexIndexGraph, and
EdgeIndexGraph concepts.

<H3>Example</H3>

A simple examples of creating a directed_graph is available here <a href="../../../libs/graph/example/directed_graph.cpp"><tt>libs/graph/example/directed_graph.cpp</tt></a>.
<P>


<PRE>
  typedef boost::directed_graph&lt;&gt; Graph;
  Graph g;
  boost::graph_traits&lt;Graph&gt;::vertex_descriptor v0 = g.add_vertex();
  boost::graph_traits&lt;Graph&gt;::vertex_descriptor v1 = g.add_vertex();

  g.add_edge(v0, v1);
</PRE>

<H3>Template Parameters</H3>

<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>

<TR><TD><TT>VertexProp</TT></TD>
<TD>A property map for the graph vertices.</TD>
<TD>&nbsp;</TD>
</TR>

<TR>
<TD><TT>EdgeProp</TT></TD>
<TD>A property map for the graph edges.</TD>
<TD>&nbsp;</TD>
</TR>

<TR>
<TD><TT>GraphProp</TT></TD>
<TD>A property map for the graph itself.</TD>
</TR>

</TABLE>
<P>

<H3>Where Defined</H3>

<P>
<a href="../../../boost/graph/directed_graph.hpp"><TT>boost/graph/directed_graph.hpp</TT></a>

<P>

<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>

</BODY>
</HTML>
